<?php
/**
 *
 */
namespace Test\modules\News;

use Yz_Module_Interface;

class Model_Detail
    extends Model_Default
{



    /** Model's constructor requires module
     *  @param Yz_Module_Interface $module
     */
    protected function __construct( Yz_Module_Interface $module )
    {
        debug();
        parent::__construct($module);
        $uploadImage = $module->selectModel('uploadImage');
        $stream = $module->selectModel('stream');
        $d =& $this->__dict__;
        $d['image']  = new \Yz_Property_ForeignKey($uploadImage, array('fieldName' => 'imageId'));
        $d['stream'] = new \Yz_Property_ForeignKey($stream, array('fieldName' => 'streamId'));
        $d['publish'] = new \Yz_Property_Checkbox();
    }


}
